//
//  MusicPlayerViewController.h
//  哎游
//
//  Created by 康守帅 on 15-1-8.
//  Copyright (c) 2015年 lanou3g.com 蓝鸥科技. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <AVFoundation/AVFoundation.h>
#import "AudioStreamer.h"
@class MusicModel;

typedef NS_ENUM(NSInteger, MusicPlayState) {
    // 其他音乐正在播放
    MusicPlayStateOtherPlaying,
    // 未有音乐在播放
    MusicPlayStateNone,
    // 音乐开始播放
    MusicPlayStateStart,
    // 音乐暂停播放
    MusicPlayStatePause,
};

typedef NS_ENUM(NSInteger, ButtonState) {
    // 上一首
    AboveButton,
    // 下一首
    NextButton,
    // 播放
    PlayButton
};

typedef NS_ENUM(NSInteger, PlayMode) {
    isOrder, // 顺序播放
    isRandom, // 随机播放
    isCycle, // 循环播放
    isSingle // 单曲循环
};

@interface MusicPlayerViewController : UIViewController
@property (copy, nonatomic) NSString *mid; // 判断标识
@property (retain, nonatomic) NSMutableArray *musicArray; // 歌曲数组
@property (nonatomic) ButtonState buttonState; // 播放状态
@property (retain, nonatomic) UILabel *name;
@property (retain, nonatomic) UIButton *circleBtn; // 循环按钮
@property (retain, nonatomic) UIButton *aboveBtn; // 上一曲
@property (retain, nonatomic) UIButton * playBtn; // 播放按钮
@property (retain, nonatomic) UIButton *nextBtn; // 下一曲
@property (retain, nonatomic) UIButton *enjoyBtn; // 收藏按钮
@property (retain, nonatomic) UISlider *progressSlider; // 滑动按钮
@property (retain, nonatomic) UIView *controlView; // 控制按钮视图
@property (retain, nonatomic) UIView *maskView; // 遮挡视图
@property (retain, nonatomic) UILabel *currentTimeLabel; // 播放时间
@property (retain, nonatomic) UILabel *totalTimeLabel; // 总时间
@property (retain, nonatomic) NSString *imageUrl; //背景图片地址
@property (assign, nonatomic) BOOL sameMusic; // 判断是否为同一首歌曲
@property (retain, nonatomic) NSString *tempId; // 用于判断歌曲的临时id
@property (retain, nonatomic) NSTimer *progressUpdateTimer; // 滑动按钮的定时器
@property (retain, nonatomic) UIImageView *backGroundImageView; // 专辑背景图片
@property (retain, nonatomic) UIButton *playModeBtn; // 播放模式按钮
@property (nonatomic) PlayMode playMode; // 播放模式
@property (assign, nonatomic) BOOL firstMusic; // 判断是否为当前专辑第一首
@property (assign, nonatomic) BOOL lastMusic; // 判断是否为当前专辑最后一首
@property (retain, nonatomic) UIView *playModeView; // 播放模式改变时显示的视图
@property (retain, nonatomic) UILabel *playModeLabel; // 播放模式文字框
@property (retain, nonatomic) NSTimer *playModeTimer; // 播放模式改变定时器
@property (assign, nonatomic) BOOL isClickPlayMode;// 判断改变播放模式按钮是否被点击过
@property (assign, nonatomic) BOOL isClickEnjoy; // 判断收藏按钮是否被点击过
@property (assign, nonatomic) BOOL isExist; //判断文件是否存在
@property (retain, nonatomic) MusicModel *music;
@property (assign, nonatomic) NSInteger index;
@property (assign, nonatomic) MusicPlayState musicPlayState;


- (void)startPlayingMusic;
@end
